package com.kws.merchant.service.impl;


import com.kws.merchant.domain.OperationTicketTask;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kws.merchant.mapper.OperationTicketTaskMapper;
import com.kws.merchant.service.OperationTicketTaskService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

import java.util.List;

/**
 * 两票任务(OperationTicketTask)表服务实现类
 *
 * @author yxy
 * @since 2024-12-11 19:58:34
 */
@Service("operationTicketTaskService")
public class OperationTicketTaskServiceImpl extends ServiceImpl<OperationTicketTaskMapper, OperationTicketTask> implements OperationTicketTaskService {

    @Resource
    private OperationTicketTaskMapper operationTicketTaskMapper;


    /**
     * 分页查询列表
     */
    @Override
    public Page<OperationTicketTask> pageList(OperationTicketTask operationTicketTask) {
        Page<OperationTicketTask> page = new Page<>(0, 10);
        LambdaQueryWrapper<OperationTicketTask> queryWrapper = Wrappers.lambdaQuery();

        return this.page(page, queryWrapper);
    }

    /**
     * 查询票据任务
     * @param id
     * @return
     */
    @Override
    public List<OperationTicketTask> listByTicketId(Long id) {
        return this.list(Wrappers.<OperationTicketTask>lambdaQuery().eq(OperationTicketTask::getTicketId,id));
    }


}
